﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yuans.BinaryConfig
{
    public class BoolItem : ConfigItem
    {
        public bool BoolValue { set; get; }
        public BoolItem(string name, bool trueOrFalse)
        {
            base.ItemName = name;
            base.ItemType = ParamType.BOOL;
            this.BoolValue = trueOrFalse;
        }
        public override string GetFriendValueDescription()
        {
            return BoolValue.ToString();
        }
        public override byte[] GetItemValueRawBytes()
        {
            return new byte[1]{(byte)(this.BoolValue ? 1 : 0)};
        }
    }
}
